String.prototype.length2 = function (){
	return this.replace(/[^\x00-\xff]/g,"aa").length;
}
String.prototype.trim = function (){
	return trim(this);
}


















///////////////////////////////////table////////////////////////////


function ListTable(){

}

function ListTable.selectAllCheckByName(v_this,v_form,v_name){
	  var eles = v_form.elements;

		if(typeof(eles) != "undefined"  && typeof(eles.length) != "undefined" ) {
			for(i=0,n=eles.length;i<n; i++) {
				var obj= eles.item(i);
				var eleName = obj.attributes.item("name").nodeValue;
				 if(eleName != null && eleName.indexOf(v_name) != -1) {
	 			    var type = obj.attributes.item("type").nodeValue;
			    	if(type == "checkbox" && obj.disabled==false){
				        obj.checked = v_this.checked;
				    }
				 }
			}
		}
};
